<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>

<body>
    <script>
        let m = new Map();
        m.set('name', 'wzc');
        m.set('chang', function() {
            console.log("wudi");
        })
        let key = {
            school: 'wzc'
        }
        m.set(key, ['wzc', 'wzc', 'wzc']);
        console.log(m.size); //查看个数
        m.delete('name'); //删除
        console.log(m.get('chang')); //获取
        console.log(m);
        m.clear(); //清空
        console.log(m);
        //遍历
        for (let v of m) {
            console.log(v);
        }
    </script>
</body>

</html>